From 361828b5dbb00fc562c3349870cc29e5ea354f4d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 28 Dec 2012 10:49:59 +0100 Subject: [PATCH] * epg.el (epg--start): Modify process-environment locally. --- lisp/ChangeLog | 4 ++++ lisp/epg.el | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c4d884a5010..e13ce397bee 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2012-12-28 Andreas Schwab + + * epg.el (epg--start): Modify process-environment locally. + 2012-12-28 Daiki Ueno * epg.el: Support pinentry-curses. diff --git a/lisp/epg.el b/lisp/epg.el index 5fb8f809aa9..a1bc25e1c44 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -1156,6 +1156,7 @@ This function is for internal use only." (coding-system-for-write 'binary) (coding-system-for-read 'binary) process-connection-type + (process-environment process-environment) (orig-mode (default-file-modes)) (buffer (generate-new-buffer " *epg*")) process @@ -1170,8 +1171,9 @@ This function is for internal use only." (delete-backward-char 1) (setq terminal-name (buffer-string)))) (when terminal-name - (setenv "GPG_TTY" terminal-name) - (setenv "TERM" "xterm")) + (setq process-environment + (cons (concat "GPG_TTY=" terminal-name) + (cons "TERM=xterm" process-environment)))) ;; Record modified time of gpg-agent socket to restore the Emacs ;; frame on text terminal in `epg-wait-for-completion'. ;; See -- 2.30.2